package com.gbei.center.utils;

/**
 * @Discription ${在此输入一句话描述此文件的作用}
 * @Author yang jun
 * @Date 2019/5/16 17:04
 */
public class SingletonStatus {

    //类初始化时，不初始化这个对象(延时加载，真正用的时候再创建)
    private static SingletonStatus instance;

    private String msg;

    //构造器私有化
    private SingletonStatus(){}

    //方法同步，调用效率低
    public static synchronized SingletonStatus getInstance(){
        if(instance==null){
            instance=new SingletonStatus();
        }
        return instance;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
